﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;

namespace CSW.Security
{
    public partial class Security_Role
    {
        partial void OnCreated()
        {
            base_OnCreated();
        }

        partial void OnLoaded()
        {
            base_OnLoaded();
        }

        partial void OnValidate(ChangeAction action)
        {
            base_OnValidate(action);
        }

        partial void OnRoleIDChanging(int value)
        {
            GeneratedOnRoleIDChanging(value);
        }

        partial void OnDescriptionChanging(string value)
        {
            GeneratedOnDescriptionChanging(value);
        }

        /// <summary>
        /// Gets all of the Role records from the databases.
        /// </summary>
        public static IEnumerable<Security_Role> GetAll()
        {
            return from s in SecurityTest.DataContextInstance.Security_Role
                   orderby s.RoleID
                   select s;
        }
    }
}
